import { useAppSelector } from '@src/redux/hook'
import { SpinLoading } from 'antd-mobile'
import style from './index.module.less'

function Main () {
  const prgress = useAppSelector(state => state.common.progress)
  const visible = useAppSelector(state => state.common.progressVisible)
  if (!visible) {
    return <span />
  }
  return (
    <div className={style.container}>
      <div className={style.inner}>
        <div className={style.loading}><SpinLoading color='#fff' style={{ '--size': '2rem' }} /></div>
        <div className={style.title}>上传中 {prgress}%</div>
        {/* <Button size='mini'>取消上传</Button> */}
      </div>
    </div>
  )
}

export default Main
